Nested VMX: fix IA32_VMX_CR4_FIXED1 msr emulation
authorYang Zhang <yang.z.zhang@Intel.com>
Fri, 4 Oct 2013 10:30:09 +0000 (12:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Oct 2013 10:30:09 +0000 (12:30 +0200)
commitc6f92aed0e209df823d2cb5780dbb1ea12fc6d4a
treeef9f8adf44914b86a82888afe50adf23a04260c2
parent1332d0e907fd5b6075241d36257f8faef5ec97a7
Nested VMX: fix IA32_VMX_CR4_FIXED1 msr emulation

Currently, it use hardcode value for IA32_VMX_CR4_FIXED1. This is wrong.
We should check guest's cpuid to know which bits are writeable in CR4 by guest
and allow the guest to set the corresponding bit only when guest has the feature.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Cleanup.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Jun Nakajima <jun.nakajima@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c
xen/include/asm-x86/cpufeature.h
xen/include/asm-x86/processor.h